<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>联想网上商城</title>
		<link rel="stylesheet" type="text/css" href="http://localhost/www/item/yushen/Application/Index/View/Public/Common/css/head.css"/>
		<link rel="stylesheet" type="text/css" href="http://localhost/www/item/yushen/Application/Index/View/Public/Common/css/base.css">
		<link rel="stylesheet" type="text/css" href="http://localhost/www/item/yushen/Application/Index/View/Public/Common/css/iconfont.css">
		<script type="text/javascript" src="http://localhost/www/item/yushen/Application/Index/View/Public/Common/js/jquery-1.7.2.min.js"></script>
    	<script type="text/javascript" src="http://localhost/www/item/yushen/Application/Index/View/Public/Common/js/index.js"></script>
	</head>
	<body>
		<!--.....................顶部导航.......................-->
		<div id="head">
			<div class="frame">
				<!--.............登陆...........-->
				<div class="head_left">
					<span class="COM">欢迎来到</span>
					<em class="lian">联想官方商城 !</em>
					<a href="<?php echo U('Login/index');?>" class="log">登陆</a>
					<span class="kong">|</span>
					<a href="<?php echo U('Register/index');?>" class="enroll">注册</a>
				</div>
				<div class="head_right">
					<div class="rig">
						<a href="http://www.lenovo.com.cn" class="web">
							<span>联想官网</span>
						</a>
						<span class="kong">|</span>
						<a href="<?php echo U('Member/index');?>">
							EPP 会员专享
						</a>						
					</div>
														
				</div>
			</div> 		
		</div>
		<!--顶部导航结束-->
		
		
		<!--..................顶部搜索栏........................-->
		<div id="head_search">
			<div class="frame">
				<div class="logo">
					<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/logo.jpg" alt="" />
				</div>
				<!--..........搜索框-->
				<div class="header_search_centre">
					<ul class="search">
						<li class="left">
							<input type="text" name="search_text" class="search_text" value="" />					
						</li>
						<li class="left">
							<a href="" class="search_bt" target="_blank" onclick="HeadSerch();">
								<img src="http://localhost/www/item/yushen/Application/Index/View/Public/img/sou.jpg" alt="" />
							</a>							
						</li>
					</ul>
					<!--............关键字-->
					<ul class="keywords">
						<li>
							<a href="" target="_blank">YOGA笔记本</a>
							<span>|</span>
						</li>
						<li>
							<a href="" target="_blank">小新笔记本</a>
							<span>|</span>
						</li>
						<li>
							<a href="" target="_blank">暑促专场</a>
							<span>|</span>
						</li>
						<li>
							<a href="" target="_blank">Y系列</a>
							<span>|</span>
						</li>
						<li>
							<a href="" target="_blank">S5000</a>
							<span>|</span>
						</li>
					</ul>					
				</div>
				<!--.....................购物车-->
				<div class="shopping_cart">
					<a href="" class="" title="我收藏的产品">
						<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/shoucang.jpg" alt="我的收藏" />
					</a>
					<a href="" class="SH_cart" title="我的购物清单">
						<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/gouche.jpg" alt="购物车" />
					</a>										
				</div>
				<!--购物车结束-->
			</div>
		</div>
		<!--顶部搜索栏结束-->
	<?php
		//使用分类模板中 获取全部分类  获得PID 为0的 分类  也就是顶级分类
    	$catedata = K('Category')->get_all_data(array('pid'=>0));
		//然后循环分类获得其他的子集分类
	   foreach ($catedata as $k => $v) {
	   		//给分类的字段$k加一个son的字段 里加入子集分类  
	   		//选择为PId 为cid 的分类赋值给这个son字段
	   		$catedata[$k]['son'] =  K('Category')->where(array('pid'=>$v['cid']))->all();
			//还有其他分类 再次循环给他的字段在加入一个新的字段分类
		   	foreach ($catedata[$k]['son'] as $key => $value) {
		   		//给他循环出来的分类在加入一个son 的字段加入其子集分类 Pid 为cid的分类
		   		//赋值给他的新加入的字段
		   		$catedata[$k]['son'][$key]['son'] =  K('Category')->where(array('pid'=>$value['cid']))->all();
		   	
		   	}
	   }
		
		
		 ?>
					<div id="content">
                
		    <?php if(CONTROLLER<>'Index'){ ?>
			<script type="text/javascript">
				$(function(){
					$('.left_Category').hover(function(){
						$('.slide').show();
					},function(){
						$('.slide').hide();
					})
				})
			</script>
		
		<?php } ?>
               
		
<!--......................导航条...............................-->
		
		<div id="top_nav">
			<div class="frame">
				<!--..................左侧导航-->
				<div class="left_Category">
					<p class="all-cate" style="margin-left:50px;">全部商品分类</p>
					 <ul class="slide"     <?php if(CONTROLLER<>'Index'){ ?>style="display: none;"<?php } ?>> 
                            <?php
        //初始化
        $hd['list']['k'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($catedata)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($catedata as $k) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][k]['index']++;
                //第1个值
                $hd['list'][k]['first']=($listId == 0);
                //最后一个值
                $hd['list'][k]['last']= (count($catedata)-1 <= $listId);
                //总数
                $hd['list'][k]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
                    <li>
                         <dl>
                             <dt><a href="<?php echo U('List/index',array('pid'=>$value['cid']));?>"><?php echo $k['cname'];?></a></dt>
                             
                             <dd >
                                         <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($k['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($k['son'] as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=4)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($k['son'])-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>                               
                                 <div class="pro_item">
                                     <a href="<?php echo U('List/index');?>"><img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/slide.jpg" alt=""/></a>
                                     <h3><?php echo $v['cname'];?></h3>
                                     <span class="codes"><?php echo $v['cname'];?></span>
                                             <?php
        //初始化
        $hd['list']['s'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $s) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][s]['index']++;
                //第1个值
                $hd['list'][s]['first']=($listId == 0);
                //最后一个值
                $hd['list'][s]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][s]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
                                     	<p>
                                     		<a href="<?php echo U('List/index');?>"><?php echo $s['cname'];?></a>
                                     	</p>
                                     <?php }}?>
                                     
                                 </div> 
                                 <?php }}?>
                             </dd>                          
                        </dl>
                     </li>
                    	                    	
                    <?php }}?>
                     
                    
                     <a href="" class="er"><img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/er.png" alt="" /></a>
                 </ul>
				</div>
				
				<!--...................右侧导航-->
				<div class="right_Category">
					<ul>
						<li>
							<a href="<?php echo U('Index/index');?>">商品首页</a>
						</li>
						<li>
							<a href="">新品专区</a>
						</li>
						<li>
							<a href="">特惠专区</a>
						</li>
						<li>
							<a href="">学生专区</a>
						</li>
						<li>
							<a href="">小新爆款</a>
						</li>
						<li>
							<a href="">L码购买</a>
						</li>
						<li>
							<a href="">想+社区</a>
						</li>
						<li>
							<a href="">O2O社区</a>
						</li>											
					</ul>																			
				</div>
				<!--...................左下导航....................-->
 

             </div>							
			</div>			
		</div>
		
		<!--导航条结束-->

	</body>
</html>
	
		<link rel="stylesheet" type="text/css" href="http://localhost/www/item/yushen/Application/Index/View/Public/Css/landing.css"/>
		<script src="http://localhost/www/item/yushen/Application/Index/View/Public/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<!--......................登陆.......................-->
		<div id="landing">
			<div class="frame" >
				
				<!--.......................左边-->
				<form class="landing_login" action="" method="post">
					<h3 class="landing_login_name" >联想商城会员登录</h3>
					<p class="login_norm">没有注册？使用右侧第三方账号登录，或者
						<a href="">免费注册</a>
					</p>
					<p class="login_label">电子邮箱</p>
					<div class="float_div" style="margin-top: -2px;">
						<input type="text" name="username" id="uname" class="x_input" value="" />
					</div>
					<div class="float_div"  style="margin-top: -3px;">
						<input type="password" name="password" id="uname" class="x_input" value="" />
					</div>
					<div class="an">
						<input type="checkbox" name="" id="" value="" />
						下次自动登陆
					</div>
					<p class="login_code">*验证码(请填入数字)：</p>
					<div class="float_div" style="margin-top: -3px;">
						
						<input type="text" name="code" id="uname" class="x_input" value="" />
						<span class="fycode">
							<img src="<?php echo U('Login/code');?>" alt=""  onclick="this.src=this.src+'&amp;t='+Math.random()"/>
						</span>
						<a href="javascript:void(0);" class="change_code">看不清楚?换个图片</a>
					</div>
					<!--.............提交.............-->
					<div class="float_div" style="margin-top: -3px;">
						<input type="submit" name="unane" id="uname" class="btn_login" value="登录联想商城 " />						
					</div>
					
				</form>
				
				
				<!--.........其他登陸方式-->
				<div class="landing_login_right">
					<div class="rest">
						<h3 class="rest_login">第三方账号登录</h3>
						<div class="cl"></div>
						<h5 class="no_login">没有注册的会员，可以直接选择下面的账号登录： </h5>
						<div class="login_logo">
							<a href="">
								<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/qq_login.jpg" alt="" />
							</a>
							<a href="">
								<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/weibo_login.jpg" alt="" />
							</a>							
						</div>
						<h3 class="tong">联想通行证登录</h3>
						<p class="jie">如果您已有联想通行帐号(简称:联想帐号)请直接点击下方按钮登录，同时即可登录联想相关站点，轻松享受更多服务。</p>
						<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/login.png" alt="" />
						
					</div>					
					
				</div>
				
			</div>
		</div>
		
		
		
	<!--//......................底部开始..........................-->	
	<div id="clcl">
		<div class="cll">
			<span class="c1"></span>
			<span class="c2"></span>
			<span class="c3"></span>
			<span class="c4"></span>
			<span class="c5"></span>
			<span class="c6"></span>
			<span class="c7"></span>
			
		</div>
		
		<!--.....................底部...............-->
		
		<div id="foot">
			<div class="frame">
				<!--...........上图面-->
				<div class="head_picture">
					<img src="http://localhost/www/item/yushen/Application/Index/View/Public/Img/logo_footer.jpg" alt="" />										
				</div>
				
				<!--............连接指南-->
				<ul class="connect">
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					<!--................-->
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					<!--........................-->
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					
					<!--...........................-->
					
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					
					<!--........................-->
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					
					<!--.......................-->
					
					<li>
						<a href="" class="head_S">
							<h3>购物指南</h3>
						</a>
						<dd class="head_ss">
							<a href="">购买流程</a>
							<a href="">注册会员</a>
							<a href="">支付指南</a>
							<a href="">购物方式</a>
							<a href="">服务商信息</a>
						</dd>												
					</li>
					<!--.........电话........-->
					<li class="phone" style="width: 860px;">
						<span>400-088-8222</span>
						<!--..........快递...........-->						
						<span class="suibian"> 快速查询距离您最近的联想销售店面联和想维修网点 </span>																		
					</li>
					
					
				</ul>
								
			</div>			
		</div>
		
		
	</body>
</html>
